<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.voc_sim</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        Module&nbsp;voc_sim
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module voc_sim</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html">source&nbsp;code</a></span></p>
<p>Simulator components for representing Virtual Organization Clusters. 
  These components provided the necessary mechanisms to simulate VOCs with 
  overlay scheduling capabilities, without imposing any particular VOC 
  allocation algorithm (a basic algorithm may be found in the watchdog_sim 
  module). The VOC class itself uses VMPilot jobs (a subclass of 
  job_model.PilotJob) to lease resources from a targeted grid site. Virtual
  machines (virtualization module) are started on these leased resources to
  provide virtual clusters.</p>
  <p>VOCs are intended to be autonomic in design, expanding and shrinking 
  themselves in response to changes in the private virtual cluster. The 
  actual algorithm used to achieve this autonomy is implemented outside 
  this module (e.g. watchdog_sim.Watchdog), allowing simulations of 
  different policies to be conducted using the same basic mechanisms.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="simvoc.core.voc_sim.VMPilot-class.html" class="summary-name">VMPilot</a><br />
      Pilot job for leasing physical machines to run virtual machines.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="simvoc.core.voc_sim.VOC-class.html" class="summary-name">VOC</a><br />
      Representation of the mechanism behind a Virtual Organization 
        Cluster.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="simvoc.core.voc_sim.AutoVOC-class.html" class="summary-name">AutoVOC</a><br />
      Replacement VOCollection object that automatically creates a VOC 
        and corresponding grid CE for each VO seen in an input trace.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim-module.html#job_rewrite_to_vo" class="summary-sig-name">job_rewrite_to_vo</a>(<span class="summary-sig-arg">site_name</span>,
        <span class="summary-sig-arg">job</span>)</span><br />
      Utility function invoked by the JobReader to rewrite job submission 
      targets from the specified site name to the VOC CE dedicated to jobs 
      from the given VO.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#job_rewrite_to_vo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim-module.html#new_voc_ce" class="summary-sig-name">new_voc_ce</a>(<span class="summary-sig-arg">grid</span>,
        <span class="summary-sig-arg">vo</span>,
        <span class="summary-sig-arg">img_name</span>,
        <span class="summary-sig-arg">img_src</span>,
        <span class="summary-sig-arg">sched_name</span>)</span><br />
      Creates a new Virtual Organization Cluster with an associated Compute
      Element and adds both objects to the specified grid.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#new_voc_ce">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'simvoc.core'"><code class="variable-quote">'</code><code class="variable-string">simvoc.core</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<p class="indent-wrapped-lines"><b>Imports:</b>
  <a href="simvoc.core.cluster_sim.Cluster-class.html" title="simvoc.core.cluster_sim.Cluster">Cluster</a>,
  <span title="simvoc.core.core_common.PJ_START">PJ_START</span>,
  <span title="simvoc.core.core_common.PJ_STOP">PJ_STOP</span>,
  <span title="simvoc.core.core_common.SC_SHUTDOWN">SC_SHUTDOWN</span>,
  <a href="simvoc.core.core_common-module.html#generate_name" title="simvoc.core.core_common.generate_name">generate_name</a>,
  <a href="simvoc.core.job_model.PilotJob-class.html" title="simvoc.core.job_model.PilotJob">PilotJob</a>,
  <a href="simvoc.core.results.VMPilotResult-class.html" title="simvoc.core.results.VMPilotResult">VMPilotResult</a>,
  <a href="simvoc.core.virtualization.VMImage-class.html" title="simvoc.core.virtualization.VMImage">VMImage</a>,
  <a href="simvoc.core.vo_format_reader.VOCollection-class.html" title="simvoc.core.vo_format_reader.VOCollection">VOCollection</a>
</p><br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="job_rewrite_to_vo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">job_rewrite_to_vo</span>(<span class="sig-arg">site_name</span>,
        <span class="sig-arg">job</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#job_rewrite_to_vo">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Utility function invoked by the JobReader to rewrite job submission 
  targets from the specified site name to the VOC CE dedicated to jobs from
  the given VO.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>site_name</code></strong> (str) - Original site name</li>
        <li><strong class="pname"><code>job</code></strong> - Job object</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>the new site name to which the job should be submitted, or None 
          if the job lacks VO information</dd>
  </dl>
</td></tr></table>
</div>
<a name="new_voc_ce"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">new_voc_ce</span>(<span class="sig-arg">grid</span>,
        <span class="sig-arg">vo</span>,
        <span class="sig-arg">img_name</span>,
        <span class="sig-arg">img_src</span>,
        <span class="sig-arg">sched_name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#new_voc_ce">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Creates a new Virtual Organization Cluster with an associated Compute 
  Element and adds both objects to the specified grid. The newly created 
  VOC will be empty (no virtual machines will be instantiated). The new 
  grid site will be named &quot;voc_ce:VO&quot; where VO is the specified 
  Virtual Organization.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>grid</code></strong> - Grid object to which new VOC and CE will be added</li>
        <li><strong class="pname"><code>vo</code></strong> (str) - Name of the Virtual Organization</li>
        <li><strong class="pname"><code>img_name</code></strong> (str) - Name of the VM image used to spawn VOC nodes</li>
        <li><strong class="pname"><code>img_src</code></strong> - Reference to the FileStore where the VM image is located</li>
        <li><strong class="pname"><code>sched_name</code></strong> (str) - Name of the scheduler to use with the VOC</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>a reference to the newly created VOC</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:28 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
